// 父传子

import { useState } from 'react';
import { Text, View } from 'react-native';
interface ChildProps {
  count: number;
}
export default function App() {
  const [count, setCount] = useState(100);
  return (
    <View>
      <Text>我是父组件</Text>
      <Text>{count}</Text>
      <Child count={count}></Child>
    </View>
  );
}

const Child = (props: ChildProps) => {
  return (
    <View>
      <Text>我是子组件</Text>
      <Text>{props.count + 1}</Text>
      <Text>{props.count + 12}</Text>
      <Text>{props.count + 13}</Text>
    </View>
  );
};
